import React from 'react';
import {
    View,
    Text,
    FlatList,
    TouchableOpacity,
    Dimensions,
    Image,
} from 'react-native';


export default class ChooseReportType extends React.Component {

    constructor(props) {
        super(props);
        // 获取参数
        this.state = {

        };
    }

    componentDidMount() {

    }

    handleChangeType(type){
        this.props.chooseType && this.props.chooseType(type)
    }
    render() {
        return (
            <View style={{padding: 40,alignItems: 'center'}}>
                <TouchableOpacity
                    style={{height: '20%',width: '80%',backgroundColor: 'rgba(77, 112, 204, 0.5)',alignItems:'center',justifyContent:'center',marginBottom: 20}}
                    onPress={()=>this.handleChangeType('clue')}
                >
                    <Text style={{color: '#fff',fontSize: 24}}>投诉登记</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    disabled={true}
                    style={{height: '20%',width: '80%',backgroundColor: 'rgba(77, 112, 204, 0.5)',alignItems:'center',justifyContent:'center',marginBottom: 20}}
                    onPress={()=>this.handleChangeType('inspection')}
                >
                    <Text style={{color: '#fff',fontSize: 24}}>巡查登记</Text>
                    <Text style={{color: '#8B4513',fontSize: 12}}>暂未开放</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    style={{height: '20%',width: '80%',backgroundColor: 'rgba(77, 112, 204, 0.5)',alignItems:'center',justifyContent:'center',marginBottom: 20}}
                    onPress={()=>this.handleChangeType('personal')}
                >
                    <Text style={{color: '#fff',fontSize: 24}}>个人案件</Text>
                </TouchableOpacity>
                <TouchableOpacity
                    style={{height: '20%',width: '80%',backgroundColor: 'rgba(77, 112, 204, 0.5)',alignItems:'center',justifyContent:'center'}}
                    onPress={()=>this.handleChangeType('enterprise')}
                >
                    <Text style={{color: '#fff',fontSize: 24}}>单位案件</Text>
                </TouchableOpacity>
            </View>
        );
    }
}
